select
Selects the given media device.
Only the selected device will be visible to JavaScript.
The mediaDevice must be one from the list of available devices in mediaDevices.
If an invalid device is passed to this method, the effect depends on what triggered the callback:
- For
getUserMedia()calls, the corresponding promise will be rejected with aNotFoundError. - For
enumerateDevices()calls, all input devices will be excluded from the resulting device list.
Parameters
media Device
the media input device to use